#!/bin/python3
# -*- coding:utf-8 -*-
"""
    微服务API模板
    Add By :陈狍子 e4ting@qq.com
"""
from flask_restful import Api,Resource

from app.flaskapp import webapp
from e4ting       import log
api = Api(webapp)

{% for api in apis %}
{{ api }}
api.add_resource({{api.class_name}},{% for url in api.restapi %}
    "/api/{{url}}",{% endfor %}
    )
log.info("""{% for url in api.restapi %} /api/{{url}} {% endfor %} {{api.class_name}}""")
{% endfor %}

